﻿<%@ Page Language="C#" MasterPageFile="~/AdminZone/AdminMaster.master" AutoEventWireup="true" CodeFile="MemberList.aspx.cs" Inherits="AdminZone_MemberList" Title="Untitled Page" %>

<%@ Register Assembly="obout_Calendar2_Net" Namespace="OboutInc.Calendar2" TagPrefix="obout" %>

<%@ Register Assembly="obout_Interface" Namespace="Obout.Interface" TagPrefix="cc2" %>

<%@ Register Assembly="obout_Grid_NET" Namespace="Obout.Grid" TagPrefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div id="toolbar-box">
        <div class="m">   
            <div class="pagetitle icon-Member"><h2>Danh sách thành viên</h2></div>      
        </div>
    </div>
    <div id="element-box">            
          <div class="m">                            
             <%--<a  href="MemberDetails.aspx">CLICK TO VIEW MEMBER DETAILS</a><br />--%>
             <asp:Label ID="lblError" runat="server" ForeColor="Red" Font-Bold="true"></asp:Label><br />
             <asp:TextBox ID="txtUsername" runat="server" Width="150" Visible="false" ></asp:TextBox>
                Tìm kiếm theo tên : <asp:TextBox ID="txtFullName" runat="server" Width="150" ></asp:TextBox>
            <asp:Button ID="btnSearch" runat="server" Text="Search" OnClick="btnSearch_Click" />
            <asp:Label ID="lblResult" runat="server"></asp:Label><br />		
            	                               	              
             <%--<asp:GridView ID="gvSearch" runat="server" CellPadding="4" ForeColor="#333333" AutoGenerateColumns="False"
                    GridLines="None" Width="794px" AllowPaging="True" OnPageIndexChanging="gvSearch_PageIndexChanging"
                    PageSize="15">
                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <RowStyle BackColor="#EFF3FB" Height="25" />
                    <EditRowStyle BackColor="#2461BF" />
                    <SelectedRowStyle BackColor="Silver" Font-Bold="True" ForeColor="#333333" />
                    <PagerStyle BackColor="#ffe5e5" ForeColor="black" HorizontalAlign="Center" />
                    <HeaderStyle BackColor="#ffe5e5" Font-Bold="True" Height="30" ForeColor="black" />
                    <AlternatingRowStyle BackColor="White" />
                    <Columns>
                        <asp:TemplateField HeaderText="Delete">
                            <HeaderTemplate>
                                <input type="checkbox" onclick="checkAll(this,'checkDel');" />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <input type="checkbox" name="checkDel" value='<%# Eval("MemberID") %>' />
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                            <HeaderStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="AdminID" HeaderText="AdminID">
                            <ItemStyle HorizontalAlign="center" />
                        </asp:BoundField>
                        <asp:HyperLinkField HeaderText="UserName" DataNavigateUrlFormatString="~/AdminZone/MemberDetail.aspx?id={0}"
                            DataNavigateUrlFields="MemberID" DataTextField="UserName">
                            <HeaderStyle HorizontalAlign="left" />
                            <ItemStyle HorizontalAlign="Left" />
                        </asp:HyperLinkField>
                        <asp:BoundField DataField="FullName" HeaderText="FullName">
                            <HeaderStyle HorizontalAlign="left" />
                            <ItemStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="Role">
                            <ItemTemplate>
                                Role
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:HyperLinkField HeaderText="Edit" DataNavigateUrlFormatString="~/AdminZone/MemberUpdate.aspx?id={0}"
                            DataNavigateUrlFields="MemberID" Text="Edit">
                            <HeaderStyle HorizontalAlign="left" />
                            <ItemStyle HorizontalAlign="Left" />
                        </asp:HyperLinkField>
                    </Columns>
                </asp:GridView>  --%>                                                                                 
            
                
                <cc1:Grid ID="Grid1" runat="server" AutoGenerateColumns="False" 
                AllowFiltering="True" AllowGrouping="True" RowEditTemplateId="tplRowEdit" 
                  OnInsertCommand="InsertRecord" OnDeleteCommand="DeleteRecord" 
                  OnUpdateCommand="UpdateRecord" AllowAddingRecords="False"  
                  AllowMultiRecordSelection="false" >                                   
                    <Columns>
                        <cc1:Column HeaderText="ID" Index="0" Width="50" DataField="MemberID">                             
                            <TemplateSettings RowEditTemplateControlId="txtID" RowEditTemplateControlPropertyName="value" />
                        </cc1:Column>
                        <cc1:Column HeaderText="Họ tên" Index="1" DataField="FullName">
                            <TemplateSettings RowEditTemplateControlId="txtFullName" RowEditTemplateControlPropertyName="value" />
                        </cc1:Column>
                        <cc1:Column HeaderText="Email" Index="2" DataField="Email">
                            <TemplateSettings RowEditTemplateControlId="txtEmail" RowEditTemplateControlPropertyName="value" />
                        </cc1:Column>
                        <cc1:Column HeaderText="Tên truy cập" Index="3" DataField="UserName">
                            <TemplateSettings RowEditTemplateControlId="txtUserName" RowEditTemplateControlPropertyName="value" />
                        </cc1:Column>
                        <cc1:Column HeaderText="Ngày đăng ký"  Index="4" DataField="RegDate">
                            <TemplateSettings RowEditTemplateControlId="txtRegDate" RowEditTemplateControlPropertyName="value" />
                        </cc1:Column>
                        <cc1:Column HeaderText="Tài khoản (Points)" Index="5" >
                        </cc1:Column>                        
                        <cc1:Column AllowEdit="true"  HeaderText="Edit" Index="6" AllowDelete="false">                                            
                        </cc1:Column>                                                                         
                        <cc1:Column  Visible="false" Index="0" Width="50" DataField="Birthday">
                            <TemplateSettings RowEditTemplateControlId="txtBirthday" RowEditTemplateControlPropertyName="value" />
                        </cc1:Column>
                        <cc1:Column Visible="false" Index="0" Width="50" DataField="Mobile">
                            <TemplateSettings RowEditTemplateControlId="txtMobile" RowEditTemplateControlPropertyName="value" />
                        </cc1:Column>
                        <cc1:Column Visible="false" Index="0" Width="50" DataField="Address">
                            <TemplateSettings RowEditTemplateControlId="txtAddress" RowEditTemplateControlPropertyName="value" />
                        </cc1:Column>      
                    </Columns> 
                                                                                                         
                <TemplateSettings RowEditTemplateId="tplRowEdit"></TemplateSettings>                                                                                       
                   <Templates>             
                        <cc1:GridTemplate runat="server" ID="tplRowEdit">                            
                            <Template>                           
                                <table border="0" cellspacing="0" cellpadding="0" width="100%">
                                	<tr>
                                	    <td  valign="top">
                                		    <fieldset style="width: 150px; height: 150px;"> 
                                		        <center>Ảnh cá nhân</center>                                               
                                                <table>
                                                    <tr>
                                                        <td>
                                                            <img src="../Images/Admin_Img/face.png" />
                                                        </td>                                                        
                                                    </tr>
                                                </table>
                                            </fieldset>
                                		</td>
                                		<td  valign="top">
                                            
                                		    <fieldset style="width: 610px; height: 250px; ">
                                                <legend>Personal information</legend>
                                                <table>
                                                    <tr>
                                                        <td>ID : </td>
                                                        <td><cc2:OboutTextBox Enabled="false" ID="txtID" runat="server" Width="200px"></cc2:OboutTextBox></td>
                                                    </tr>
                                                    <tr>
                                                        <td>Tên người dùng : </td>
                                                        <td><cc2:OboutTextBox  ID="txtFullName" runat="server" Width="400px"></cc2:OboutTextBox></td>
                                                    </tr>
                                                    <tr>
                                                        <td>Tài khoản đăng nhập: </td>
                                                        <td><cc2:OboutTextBox Enabled="false" ID="txtUserName" runat="server" Width="400px"></cc2:OboutTextBox></td>
                                                    </tr>
                                                  <tr>
                                                        <td>Ngày sinh : </td>
                                                        <td>
                                                            <cc2:OboutTextBox Enabled="false" ID="txtBirthday" runat="server" Width="400px"></cc2:OboutTextBox>                                                                
                                                        </td>
                                                        <td>
                                                            <obout:Calendar DatePickerImagePath ="../Images/Admin_Img/calendar.png"  ID="Calendar1" TextBoxId="txtBirthday" DatePickerSynchronize="true" runat="server" DatePickerMode="true">
                                                            </obout:Calendar>                                                            
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>Ngày đăng ký : </td>
                                                        <td><cc2:OboutTextBox Enabled="false" ID="txtRegDate" runat="server" Width="400px"></cc2:OboutTextBox></td>
                                                    </tr>
                                                     <tr>
                                                        <td>Email : </td>
                                                        <td><cc2:OboutTextBox ID="txtEmail" runat="server" Width="400px"></cc2:OboutTextBox></td>
                                                    </tr>
                                                    <tr>
                                                        <td>Mobile : </td>
                                                        <td><cc2:OboutTextBox  ID="txtMobile" runat="server" Width="400px"></cc2:OboutTextBox></td>
                                                    </tr>
                                                    <tr>
                                                        <td>Địa chỉ : </td>
                                                        <td><cc2:OboutTextBox ID="txtAddress" runat="server" Width="400px"></cc2:OboutTextBox></td>
                                                    </tr>
                                                    <%--<tr>
                                                        <td></td>
                                                        <td>
                                                            <input type="button" value="Save" onclick="Grid1.save()" />
                                                            <input type="button" value="Cancel" onclick="Grid1.cancel()" />
                                                        </td>
                                                    </tr>  --%>                                                  
                                                </table>
                                            </fieldset>
                                		</td>
                                		<td  valign="top">
                                		    <fieldset style="width: 250px; height: 175px;">
                                                <legend>Property</legend>
                                                Không có thông tin mô tả
                                            </fieldset>
                                		</td>
                                	</tr>
                                </table>
                            </Template>
                        </cc1:GridTemplate>
                    </Templates>                                   
                </cc1:Grid>                                                                               			                        
          <div class="clr"/>        
        </div>  
     </div> 
</asp:Content>

